-- GENERATED SPELL FOR [Hakkari Frostwing] --


function spell0_5291(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(11831,pUnit)
pUnit:RegisterEvent('Sorts_5291', 8305, 1)
end

function spell1_5291(pUnit, Event) --@Frostbolt Volley,n/a--
pUnit:FullCastSpellOnTarget(8398,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5291', 10000, 1)
end

function spell2_5291(pUnit, Event) --@Swoop,n/a--
pUnit:FullCastSpellOnTarget(5708,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5291', 2285, 1)
end

function Sorts_5291(pUnit, Event)
local choix_sorts_5291 = math.random(0, 2)
if choix_sorts_5291 == 0 then
pUnit:RegisterEvent('spell0_5291', 1, 1)
end
if choix_sorts_5291 == 1 then
pUnit:RegisterEvent('spell1_5291', 1, 1)
end
if choix_sorts_5291 == 2 then
pUnit:RegisterEvent('spell2_5291', 1, 1)
end
end

function mob5291_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_5291', math.random(1500, 3000), 1)
end

function mob5291_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5291_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5291_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(5291, 1, 'mob5291_Action')
RegisterUnitEvent(5291, 2, 'mob5291_Leave')
RegisterUnitEvent(5291, 3, 'mob5291_Kill')
RegisterUnitEvent(5291, 4, 'mob5291_Die')
